package com.vrv.jdbc;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.vrv.domain.Student;

/**
 * desc:
 * 
 * @author lsr lishaorui@vrvmail.com.cn
 * @version 2014-1-9
 */
public class StudentRowMapper implements RowMapper<Student> {

    @Override
    public Student mapRow(ResultSet rs, int rowNum) throws SQLException {
        Student s = new Student();
        s.setId(rs.getString("id"));
        s.setName(rs.getString("name"));
        s.setAge(rs.getInt("age"));
        s.setScore(rs.getFloat("score"));
        return s;
    }

}
